﻿using System;
using System.Collections;
using System.Collections.Generic;
using Manager;
using UnityEngine;

// Token: 0x02000291 RID: 657
[Serializable]
public class CharFemale : global::CharInfo
{
	// Token: 0x17000232 RID: 562
	// (get) Token: 0x06000FDD RID: 4061 RVA: 0x000748C4 File Offset: 0x00072AC4
	// (set) Token: 0x06000FDE RID: 4062 RVA: 0x000748CC File Offset: 0x00072ACC
	public global::CharFemaleBody femaleBody { get; set; }

	// Token: 0x17000233 RID: 563
	// (get) Token: 0x06000FDF RID: 4063 RVA: 0x000748D8 File Offset: 0x00072AD8
	// (set) Token: 0x06000FE0 RID: 4064 RVA: 0x000748E0 File Offset: 0x00072AE0
	public global::CharFemaleCustom femaleCustom { get; set; }

	// Token: 0x17000234 RID: 564
	// (get) Token: 0x06000FE1 RID: 4065 RVA: 0x000748EC File Offset: 0x00072AEC
	// (set) Token: 0x06000FE2 RID: 4066 RVA: 0x000748F4 File Offset: 0x00072AF4
	public global::CharFemaleClothes femaleClothes { get; set; }

	// Token: 0x17000235 RID: 565
	// (get) Token: 0x06000FE3 RID: 4067 RVA: 0x00074900 File Offset: 0x00072B00
	// (set) Token: 0x06000FE4 RID: 4068 RVA: 0x00074908 File Offset: 0x00072B08
	public global::CharFemaleFile femaleFile { get; set; }

	// Token: 0x17000236 RID: 566
	// (get) Token: 0x06000FE5 RID: 4069 RVA: 0x00074914 File Offset: 0x00072B14
	// (set) Token: 0x06000FE6 RID: 4070 RVA: 0x0007491C File Offset: 0x00072B1C
	public global::CharFileInfoCustomFemale femaleCustomInfo { get; set; }

	// Token: 0x17000237 RID: 567
	// (get) Token: 0x06000FE7 RID: 4071 RVA: 0x00074928 File Offset: 0x00072B28
	// (set) Token: 0x06000FE8 RID: 4072 RVA: 0x00074930 File Offset: 0x00072B30
	public global::CharFileInfoClothesFemale femaleClothesInfo { get; set; }

	// Token: 0x17000238 RID: 568
	// (get) Token: 0x06000FE9 RID: 4073 RVA: 0x0007493C File Offset: 0x00072B3C
	// (set) Token: 0x06000FEA RID: 4074 RVA: 0x00074944 File Offset: 0x00072B44
	public global::CharFileInfoStatusFemale femaleStatusInfo { get; set; }

	// Token: 0x17000239 RID: 569
	// (get) Token: 0x06000FEB RID: 4075 RVA: 0x00074950 File Offset: 0x00072B50
	// (set) Token: 0x06000FEC RID: 4076 RVA: 0x00074958 File Offset: 0x00072B58
	public global::CharFileInfoParameterFemale femaleParameterInfo { get; set; }

	// Token: 0x06000FED RID: 4077 RVA: 0x00074964 File Offset: 0x00072B64
	public override bool Load(bool changeStatus = false)
	{
		return this.femaleBody.Load(changeStatus);
	}

	// Token: 0x06000FEE RID: 4078 RVA: 0x00074974 File Offset: 0x00072B74
	public override void Reload(bool noChangeClothes = false, bool noChangeHead = false, bool noChangeHair = false)
	{
		this.femaleBody.Reload(noChangeClothes, noChangeHead, noChangeHair);
	}

	// Token: 0x06000FEF RID: 4079 RVA: 0x00074984 File Offset: 0x00072B84
	public override IEnumerator LoadAsync(bool changeStatus = false)
	{
		yield return base.StartCoroutine(this.femaleBody.LoadAsync(changeStatus, true));
		yield break;
	}

	// Token: 0x06000FF0 RID: 4080 RVA: 0x000749B0 File Offset: 0x00072BB0
	public virtual void SetNipStand(float value)
	{
		this.femaleCustom.SetShapeBodyValue(global::CharDefine.cf_bodyshapename.Length - 1, value);
	}

	// Token: 0x1700023A RID: 570
	// (get) Token: 0x06000FF1 RID: 4081 RVA: 0x000749C8 File Offset: 0x00072BC8
	// (set) Token: 0x06000FF2 RID: 4082 RVA: 0x000749D8 File Offset: 0x00072BD8
	public float hohoAkaRate
	{
		get
		{
			return this.femaleStatusInfo.hohoAkaRate;
		}
		set
		{
			this.ChangeHohoAkaRate(value);
		}
	}

	// Token: 0x06000FF3 RID: 4083 RVA: 0x000749E4 File Offset: 0x00072BE4
	public virtual void ChangeHohoAkaRate(float value)
	{
		this.femaleStatusInfo.hohoAkaRate = value;
		List<GameObject> tagInfo = base.GetTagInfo(global::CharReference.TagObjKey.ObjSkinFace);
		if (tagInfo.Count != 0 && 2 <= tagInfo[0].GetComponent<Renderer>().materials.Length)
		{
			Material matHohoAka = this.femaleBody.matHohoAka;
			float v = this.femaleCustomInfo.skinColor.hsvDiffuse.V;
			float a = value * Mathf.Lerp(0.2f, 1f, v);
			Color color = new Color(matHohoAka.color.r, matHohoAka.color.g, matHohoAka.color.b, a);
			tagInfo[0].GetComponent<Renderer>().materials[1].color = color;
			this.femaleCustom.SetFaceBaseMaterial();
		}
	}

	// Token: 0x1700023B RID: 571
	// (get) Token: 0x06000FF4 RID: 4084 RVA: 0x00074ABC File Offset: 0x00072CBC
	// (set) Token: 0x06000FF5 RID: 4085 RVA: 0x00074ACC File Offset: 0x00072CCC
	public byte tearsLv
	{
		get
		{
			return this.femaleStatusInfo.tearsLv;
		}
		set
		{
			this.femaleStatusInfo.tearsLv = (byte)Mathf.Clamp((int)value, 0, 3);
		}
	}

	// Token: 0x06000FF6 RID: 4086 RVA: 0x00074AE4 File Offset: 0x00072CE4
	public virtual global::DynamicBone_Ver02 getDynamicBone(global::CharFemaleBody.DynamicBoneKind _eArea)
	{
		return this.femaleBody.getDynamicBone(_eArea);
	}

	// Token: 0x1700023C RID: 572
	// (get) Token: 0x06000FF7 RID: 4087 RVA: 0x00074AF4 File Offset: 0x00072CF4
	// (set) Token: 0x06000FF8 RID: 4088 RVA: 0x00074B04 File Offset: 0x00072D04
	public bool resetupDynamicBoneBust
	{
		get
		{
			return this.femaleBody.resetupDynamicBoneBust;
		}
		set
		{
			this.femaleBody.resetupDynamicBoneBust = value;
		}
	}

	// Token: 0x06000FF9 RID: 4089 RVA: 0x00074B14 File Offset: 0x00072D14
	public override bool InitializeExpression(bool enable = true)
	{
		return this.femaleBody.InitializeExpression(enable);
	}

	// Token: 0x06000FFA RID: 4090 RVA: 0x00074B24 File Offset: 0x00072D24
	public virtual void Initialize(GameObject _objRoot, int id, int no, global::CharFemaleFile _chafile = null)
	{
		base.MemberInitialize();
		base.ListInfo = global::Singleton<Manager.Character>.Instance.charaListInfo;
		base.objRoot = _objRoot;
		base.CharID = id;
		base.LoadNo = no;
		base.Sex = 1;
		this.hideMoz = false;
		bool flag = _chafile != null && _chafile.customInfo.sex == 1;
		if (flag)
		{
			this.femaleFile = _chafile;
			base.chaFile = _chafile;
		}
		else
		{
			global::CharFemaleFile charFemaleFile = new global::CharFemaleFile();
			this.femaleFile = charFemaleFile;
			base.chaFile = charFemaleFile;
		}
		global::CharFileInfoCustomFemale femaleCustomInfo = this.femaleFile.femaleCustomInfo;
		this.femaleCustomInfo = femaleCustomInfo;
		base.customInfo = femaleCustomInfo;
		global::CharFileInfoClothesFemale femaleClothesInfo = this.femaleFile.femaleClothesInfo;
		this.femaleClothesInfo = femaleClothesInfo;
		base.clothesInfo = femaleClothesInfo;
		global::CharFileInfoStatusFemale femaleStatusInfo = this.femaleFile.femaleStatusInfo;
		this.femaleStatusInfo = femaleStatusInfo;
		base.statusInfo = femaleStatusInfo;
		global::CharFileInfoParameterFemale femaleParameterInfo = this.femaleFile.femaleParameterInfo;
		this.femaleParameterInfo = femaleParameterInfo;
		base.parameterInfo = femaleParameterInfo;
		global::CharFemaleBody charFemaleBody = _objRoot.AddComponent<global::CharFemaleBody>();
		this.femaleBody = charFemaleBody;
		base.chaBody = charFemaleBody;
		if (base.chaBody)
		{
			this.femaleBody.Initialize(this);
			global::CharFemaleCustom femaleCustom = this.femaleBody.femaleCustom;
			this.femaleCustom = femaleCustom;
			base.chaCustom = femaleCustom;
			global::CharFemaleClothes femaleClothes = this.femaleBody.femaleClothes;
			this.femaleClothes = femaleClothes;
			base.chaClothes = femaleClothes;
		}
		if (!flag)
		{
			this.LoadPresetInfo("ill_f_Honey_01", false);
		}
	}

	// Token: 0x06000FFB RID: 4091 RVA: 0x00074CA4 File Offset: 0x00072EA4
	public virtual void LoadPresetInfo(string assetName, bool noSetPNG = false)
	{
		Dictionary<int, global::CharaSampleInfo> charaSampleInfoF = base.ListInfo.GetCharaSampleInfoF();
		foreach (KeyValuePair<int, global::CharaSampleInfo> keyValuePair in charaSampleInfoF)
		{
			if (keyValuePair.Value.fileName == assetName)
			{
				this.femaleFile.charaFileName = assetName + ".png";
				this.femaleFile.Load(keyValuePair.Value.abName, keyValuePair.Value.fileName, noSetPNG, true);
				break;
			}
		}
	}

	// Token: 0x06000FFC RID: 4092 RVA: 0x00074D58 File Offset: 0x00072F58
	public virtual void HideEyeHighlight(bool hide)
	{
		this.femaleStatusInfo.hideEyesHighlight = hide;
		List<GameObject> tagInfo = base.GetTagInfo(global::CharReference.TagObjKey.ObjEyeHi);
		for (int i = 0; i < tagInfo.Count; i++)
		{
			if (!(null == tagInfo[i]))
			{
				tagInfo[i].GetComponent<Renderer>().enabled = !hide;
			}
		}
	}

	// Token: 0x06000FFD RID: 4093 RVA: 0x00074DC0 File Offset: 0x00072FC0
	public override void ChangeMouthPtnSub(int ptn, bool blend)
	{
		if (ptn == 35 || ptn == 36)
		{
			base.ChangeTongueState(1);
		}
		else
		{
			base.ChangeTongueState(0);
		}
	}

	// Token: 0x06000FFE RID: 4094 RVA: 0x00074DE8 File Offset: 0x00072FE8
	public virtual void SetTuyaRate(float rate)
	{
		if (this.femaleCustomInfo == null)
		{
			return;
		}
		float num = 1f;
		float specularSharpness = this.femaleCustomInfo.skinColor.specularSharpness;
		if (specularSharpness >= num)
		{
			return;
		}
		global::HSColorSet hscolorSet = new global::HSColorSet();
		hscolorSet.Copy(this.femaleCustomInfo.skinColor);
		float a = Mathf.Max(0f, specularSharpness);
		hscolorSet.specularSharpness = Mathf.Lerp(a, num, rate);
		if (base.chaBody.customMatFace)
		{
			base.chaBody.customMatFace.SetFloat(global::Singleton<Manager.Character>.Instance._Smoothness, hscolorSet.specularSharpness);
			this.femaleCustom.SetFaceBaseMaterial();
		}
		if (base.chaBody.customMatBody)
		{
			base.chaBody.customMatBody.SetFloat(global::Singleton<Manager.Character>.Instance._Smoothness, hscolorSet.specularSharpness);
			this.femaleCustom.SetBodyBaseMaterial();
		}
	}

	// Token: 0x06000FFF RID: 4095 RVA: 0x00074ED4 File Offset: 0x000730D4
	public virtual void SetSiruFlags(global::CharDefine.SiruParts parts, byte lv)
	{
		this.femaleBody.siruNewLv[(int)parts] = lv;
	}

	// Token: 0x06001000 RID: 4096 RVA: 0x00074EE4 File Offset: 0x000730E4
	public virtual byte GetSiruFlags(global::CharDefine.SiruParts parts)
	{
		return this.femaleStatusInfo.siruLv[(int)parts];
	}

	// Token: 0x06001001 RID: 4097 RVA: 0x00074EF4 File Offset: 0x000730F4
	public virtual void UpdateBustSoftnessAndGravity()
	{
		this.UpdateBustSoftness();
		this.UpdateBustGravity();
	}

	// Token: 0x06001002 RID: 4098 RVA: 0x00074F04 File Offset: 0x00073104
	public virtual void ChangeBustSoftness(float soft)
	{
		if (this.femaleBody.bustSoft != null)
		{
			this.femaleBody.bustSoft.Change(soft, this.femaleBody.bustChangeSettingPtn);
		}
	}

	// Token: 0x06001003 RID: 4099 RVA: 0x00074F34 File Offset: 0x00073134
	public virtual void UpdateBustSoftness()
	{
		if (this.femaleBody.bustSoft != null)
		{
			this.femaleBody.bustSoft.ReCalc(this.femaleBody.bustChangeSettingPtn);
		}
	}

	// Token: 0x06001004 RID: 4100 RVA: 0x00074F64 File Offset: 0x00073164
	public virtual void ChangeBustGravity(float gravity)
	{
		if (this.femaleBody.bustGravity != null)
		{
			this.femaleBody.bustGravity.Change(gravity, this.femaleBody.bustChangeSettingPtn);
		}
	}

	// Token: 0x06001005 RID: 4101 RVA: 0x00074F94 File Offset: 0x00073194
	public virtual void UpdateBustGravity()
	{
		if (this.femaleBody.bustGravity != null)
		{
			this.femaleBody.bustGravity.ReCalc(this.femaleBody.bustChangeSettingPtn);
		}
	}

	// Token: 0x06001006 RID: 4102 RVA: 0x00074FC4 File Offset: 0x000731C4
	public virtual bool InitDynamicBone()
	{
		foreach (KeyValuePair<global::CharFemaleBody.DynamicBoneKind, global::DynamicBone_Ver02> keyValuePair in this.femaleBody.dictDynamicBone)
		{
			if (null != keyValuePair.Value)
			{
				keyValuePair.Value.ResetParticlesPosition();
			}
		}
		return true;
	}

	// Token: 0x06001007 RID: 4103 RVA: 0x0007503C File Offset: 0x0007323C
	public virtual bool ReSetupDynamicBone()
	{
		global::DynamicBone_Ver02 dynamicBone_Ver = null;
		if (this.femaleBody.dictDynamicBone.TryGetValue(global::CharFemaleBody.DynamicBoneKind.BreastL, out dynamicBone_Ver))
		{
			dynamicBone_Ver.ResetPosition();
		}
		if (this.femaleBody.dictDynamicBone.TryGetValue(global::CharFemaleBody.DynamicBoneKind.BreastR, out dynamicBone_Ver))
		{
			dynamicBone_Ver.ResetPosition();
		}
		return true;
	}

	// Token: 0x06001008 RID: 4104 RVA: 0x00075088 File Offset: 0x00073288
	public virtual bool playYure(int _nArea, bool _bPlay)
	{
		global::DynamicBone_Ver02 dynamicBone_Ver = null;
		if (_nArea == 0)
		{
			if (this.femaleBody.dictDynamicBone.TryGetValue(global::CharFemaleBody.DynamicBoneKind.BreastL, out dynamicBone_Ver))
			{
				dynamicBone_Ver.enabled = _bPlay;
			}
			if (this.femaleBody.dictDynamicBone.TryGetValue(global::CharFemaleBody.DynamicBoneKind.BreastR, out dynamicBone_Ver))
			{
				dynamicBone_Ver.enabled = _bPlay;
			}
		}
		else
		{
			if (this.femaleBody.dictDynamicBone.TryGetValue(global::CharFemaleBody.DynamicBoneKind.HipL, out dynamicBone_Ver))
			{
				dynamicBone_Ver.enabled = _bPlay;
			}
			if (this.femaleBody.dictDynamicBone.TryGetValue(global::CharFemaleBody.DynamicBoneKind.HipR, out dynamicBone_Ver))
			{
				dynamicBone_Ver.enabled = _bPlay;
			}
		}
		return true;
	}

	// Token: 0x06001009 RID: 4105 RVA: 0x00075120 File Offset: 0x00073320
	public virtual bool playYure(global::CharFemaleBody.DynamicBoneKind _eArea, bool _bPlay)
	{
		global::DynamicBone_Ver02 dynamicBone_Ver = null;
		if (this.femaleBody.dictDynamicBone.TryGetValue(_eArea, out dynamicBone_Ver))
		{
			dynamicBone_Ver.enabled = _bPlay;
		}
		return true;
	}

	// Token: 0x04001180 RID: 4480
	public bool hideMoz;
}
